import instance from '../axios/index'

// 获取商品分类列表
export const getCateList = async () => {
    const res = await instance.get('/Goods/goodsCategory')
    return res.data.data
}


// 添加商品
export const addGoods = async (data) => {
   
    const res = await instance.post('/Goods/addCategory', data)
  
    return res.data.data
}

//回显
export const getGoods = async (id) => {
    const res = await instance.post('/Goods/editcategory', { id })
    return res.data.data
}

//修改商品
export const editGoods = async (data) => {
    const res = await instance.post('/Goods/editCategoryTo', data)
    return res.data.data
}


// 删除商品
export const delGoods = async (id) => {
    const res = await instance.post('/Goods/deleteCategory', { id })
    return res.data.data
}
